package com.wsz.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wsz.pojo.FriendId;
import com.wsz.pojo.R;
import com.wsz.user.service.FriendIdService;
import com.wsz.user.mapper.FriendIdMapper;
import com.wsz.utils.SecurityContextUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author wangs
* @description 针对表【friend_id】的数据库操作Service实现
* @createDate 2023-02-07 13:44:18
*/
@Service
public class FriendIdServiceImpl extends ServiceImpl<FriendIdMapper, FriendId>
    implements FriendIdService{

    @Override
    public R getlist() {
        String userId = SecurityContextUtils.getUserId();
        List<FriendId> list = list(new QueryWrapper<FriendId>().eq("u_id",userId));
        return R.ok().data("list",list);
    }
}




